let mongoose = require('mongoose')

module.exports = mongoose.model("patient", {
    user: {
        type: mongoose.SchemaTypes.ObjectId,
        ref: 'users',
        required: true
    },
    name: {
        type: String,
        required: true,
    },
    idcard: {
        type: String,
        required: true
    },
    sex: {
        type: String,
        required: true
    },
    tel: {
        type: Number,
        required: true
    },
    date: {
        type: String,
        required: true
    },
    site: {
        type: String,
        required: false
    },
    social: {
        type: Number,
        required: false
    },
    relate: {
        type: String,
        required: false
    },
    state: {
        type: Boolean,
        default: false
    },
    bdcard: {
        type: String,
        required: false
    },
})